﻿//
// *************************************************************************************
// WP-Framework
//
// Developed by 
// Lukas Kretschmar (lkretschmar.dev@bluewin.ch)
//
// Switzerland, Copyright (c) 2012 lkretschmar
// This content is released under the MIT License (http://opensource.org/licenses/MIT).
//    
// *************************************************************************************
//
//
			

using System;
using System.Linq.Expressions;
using System.Reflection;
using KretschIT.WP_Fx.EasyMoq.Calls.Properties;

namespace KretschIT.WP_Fx.EasyMoq
{
    public interface IMock<T> where T : class
    {
        IAction<T> Setup(Expression<Action<T>> call);
        IFunction<T, TResult> Setup<TResult>(Expression<Func<T, TResult>> call);
        IPropertyGetter<T, TResult> SetupGet<TResult>(Expression<Func<T, TResult>> property);
        IPropertySetter<T> SetupSet<TResult>(Expression<Func<T, TResult>> property);

        void Raises(Action<IEventsOf<T>> eventCall);

        void Verify(Expression<Action<T>> call, ICondition condition = null);
        void Verify<TResult>(Expression<Func<T, TResult>> call, ICondition condition = null);
        void VerifyGet<TResult>(Expression<Func<T, TResult>> property, ICondition condition = null);
        void VerifySet<TResult>(Expression<Func<T, TResult>> property, ICondition condition = null);
        void VerifySetter(Func<T, PropertyInfo> property, ICondition condition = null);
        void SetDefaultVerificationCondition(ICondition condition);

        T Object { get; }
    }
}
